app-id: com.voxdsp.AstroImpact
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
command: astroimpact
rename-icon: astroimpact
rename-desktop-file: astroimpact.desktop
rename-appdata-file: astroimpact.appdata.xml
finish-args:
  - --socket=wayland
  - --socket=fallback-x11
  - --share=ipc
  - --device=dri
  - --share=network
modules:
  - name: glfw
    buildsystem: cmake-ninja
    config-opts:
      - -DCMAKE_BUILD_TYPE=Release
      - -DBUILD_SHARED_LIBS=ON
      - -DGLFW_BUILD_EXAMPLES=OFF
      - -DGLFW_BUILD_TESTS=OFF
      - -DGLFW_BUILD_DOCS=OFF
      - -DGLFW_USE_WAYLAND=1
    sources:
      - type: git
        url: https://github.com/glfw/glfw.git
        commit: 3eaf1255b29fdf5c2895856c7be7d7185ef2b241
  - name: astroimpact
    buildsystem: simple
    build-commands:
      - make
      - cp bin/fat astroimpact
      - install -Dm 0755 astroimpact -t ${FLATPAK_DEST}/bin
      - install -Dm 0644 flatpak/astroimpact.desktop ${FLATPAK_DEST}/share/applications/astroimpact.desktop
      - install -Dm 0644 flatpak/astroimpact.appdata.xml ${FLATPAK_DEST}/share/metainfo/astroimpact.appdata.xml
      - install -Dm 0644 flatpak/astroimpact.png ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps/astroimpact.png
    sources:
      - type: git
        url: https://notabug.org/AstroImpact/AstroImpact.git
        commit: cbad03c6f96b64c65881bcb5c15ba635be26aec2